package com.atguigu.gmall.wms.config;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**Redisson 强化类
 * @author Jia Fa
 * @create 2021-12-12 21:48
 */
@Configuration
public class RedissonConfig {

    @Bean
    public RedissonClient config(){
        Config config = new Config();
        //Redis url should start with redis:// or rediss:// (for SSL connection)错误
        config.useSingleServer().setAddress("redis://192.168.154.100:6379");
        return Redisson.create(config);

    }

}
